<?php

namespace App\Http\Controllers\Api\V1;

use App\Models\Video;
use Illuminate\Http\Request;
use App\Http\Transformers\VideoTransformer;

class VideoController extends BaseController
{
    //
    protected  $videos;
    public function __construct(Video $video)
    {
        $this->videos = $video;
    }
    public function index(Request $request)
    {
        return $this->response->noContent();
    }
    public function videoList(VideoTransformer $videoTransformer,Request $request)
    {
        $pageSize = $request->input('pageSize')==0 ? 15:$request->input('pageSize');

        $user = $this->videos->paginate($pageSize);
        return $this->response->paginator($user, $videoTransformer);
    }
}
